﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href="/Content/admin/css/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
</head>
<body>

    <ol class="breadcrumb">
        <li><a href="/set/admin/center">首页></a></li>
        <li><a href="#">资金结算></a></li>
        <li class="active">全局设置</li>
    </ol>
    <div class="container-fluid">
        <div class="tabbable tabbable-custom boxless tabbable-reversed">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#tab_weixin" data-toggle="tab">全局设置</a></li>
                <li><a href="#tab_ali" data-toggle="tab">会员设置</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="tab_weixin">
                    <div class="modal-body">
                        <!-- BEGIN FORM-->


                        <div class="panel panel-default">
                            <div class="panel-body">
                                <form action="/Settlement/Global/Save" class="form-horizontal" id="formGlobalSave" method="post">
                                    <div class="form-body">
                                        <div class="row">
                                            <div class="form-group">
                                                <label class="control-label col-sm-3">
                                                    结算模式:
                                                </label>
                                                <div class="col-sm-3">
                                                    <div class="btn-group" data-toggle="buttons">
                                                        <label class="btn btn-default btn-sm active">
                                                            <input checked="checked" id="Target" name="GlobalType" type="radio" value="0">
                                                            预购积分
                                                        </label>
                                                        <label class="btn btn-default btn-sm">
                                                            <input id="Target" name="GlobalType" type="radio" value="1">
                                                            消费结算
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="form-group">
                                                <label class="control-label col-sm-3">
                                                    积分价格:
                                                </label>
                                                <div class="col-sm-3">
                                                    <div class="input-group">

                                                        <input type="text" class="form-control input-sm" value="@ViewData["PointPrice"]" name="PointPrice" id="PointPrice" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" errormsg="必须是数字!" nullmsg="请填写积分价格!" />
                                                        <span class="input-group-addon">分抵一元</span>
                                                    </div>

                                                </div>
                                                <span class="help-block">积分折合人民币汇率</span>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="form-group">
                                                <label class="control-label col-sm-3">
                                                    代金券结算:
                                                </label>
                                                <div class="col-sm-3">
                                                    <div class="btn-group" data-toggle="buttons">
                                                        <label class="btn btn-default btn-sm active">
                                                            <input checked="checked" id="CouponGlobal" name="CouponGlobal" type="radio" value="true">
                                                            参与结算
                                                        </label>
                                                        <label class="btn btn-default btn-sm">
                                                            <input id="Target" name="CouponGlobal" type="radio" value="false">
                                                            排除结算
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="form-group">
                                                <label class="control-label col-sm-3">
                                                    积分结算:
                                                </label>
                                                <div class="col-sm-3">
                                                    <div class="btn-group" data-toggle="buttons">
                                                        <label class="btn btn-default btn-sm active">
                                                            <input checked="checked" id="PointGlobal" name="PointGlobal" type="radio" value="true">
                                                            参与结算
                                                        </label>
                                                        <label class="btn btn-default btn-sm">
                                                            <input id="Target" name="PointGlobal" type="radio" value="false">
                                                            排除结算
                                                        </label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-actions">
                                        <div class="row">
                                            <div class="col-md-offset-5 col-sm-7">
                                                <input type="submit" value="保存" class="btn btn-primary btn-sm" />
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>

                        <!-- END FORM-->
                        <div class="panel panel-default">
                            <div class="panel-heading">会员级别分成默认设置</div>

                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>会员级别</th>
                                        <th>默认返点</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>Mark</td>
                                        <td>Otto</td>
                                        <td>mdo</td>
                                    </tr>
                                    <tr>
                                        <td>Jacob</td>
                                        <td>Thornton</td>
                                        <td>fat</td>
                                    </tr>
                                    <tr>
                                        <td>Larry</td>
                                        <td>the Bird</td>
                                        <td>twitter</td>
                                    </tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
                <div class="tab-pane" id="tab_ali">
                    <div class="modal-body">
                        <!-- BEGIN FORM-->
                        <form action="/SystemManage/PayParameter/SaveParameter" class="form-horizontal" id="formValueParameter2" method="post">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    会员推荐
                                </div>
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="form-group">
                                            <label class="control-label col-sm-3">
                                                总部微信商户号
                                            </label>
                                            <div class="col-sm-3">
                                                <input type="text" class="form-control input-sm"
                                                       value="1230258902" id="mch_id" name="mch_id">
                                            </div>
                                            <span class="help-block">微信支付商户后台"账户预览"中查询</span>
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    会员等级
                                </div>
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="form-group">
                                            <label class="control-label col-sm-3">
                                                服务商商户号
                                            </label>
                                            <div class="col-sm-3">
                                                <input type="text" class="form-control input-sm" value="1332698901" id="server_mch_id" name="server_mch_id">
                                            </div>
                                            <span class="help-block">服务商收款商户号</span>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="form-group">
                                            <label class="control-label col-sm-3">
                                                商户独立收款
                                            </label>
                                            <div class="col-sm-3">
                                                <select class="form-control  input-sm" name="IsBusinessCollection" id="IsBusinessCollection">
                                                    <option value="true">启用</option>
                                                    <option value="false">关闭</option>
                                                </select>
                                            </div>
                                            <span class="help-block">开启商户独立收款需要申请成为服务商</span>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </form>
                        <div class="form-actions">
                            <div class="row">
                                <div class="col-md-offset-5 col-sm-7">
                                    <input type="button" value="保存" class="btn btn-primary" onclick="SaveValueParameterPaySet('formValueParameter2')" />
                                </div>
                            </div>
                        </div>
                        <!-- END FORM-->
                    </div>
                </div>
            </div>
        </div>
        <script src="/Content/Validform_v5.3.2/Validform_v5.3.2_min.js"></script>
        <script src="~/Content/admin/js/bootstrap.min.js"></script>
        <script src="~/Content/layer/layer.js"></script>

        <script type="text/javascript">
            function ShowTipMsg(id, msg)
            {
                layer.tips(msg, '#' + id, { tipsMore: true, time: 4000 });
            }

            $(function ()
            {
                $("#formGlobalSave").Validform({
                    ajaxPost: true,
                    showAllError: true,
                    callback: function (data)
                    {
                        if (data.succ)
                        {
                            parent.layer.msg('保存成功!', { shade: 0.1, time: 2000, icon: 1 })
                        }
                    },
                    tiptype: function (msg, o)
                    {
                        if (o.type == "3")
                        {
                            ShowTipMsg($(o.obj).attr("id"), msg)
                        } else
                        {
                            parent.layer.closeAll();
                        }
                    }
                }
    );
            });
        </script>
    </div>
</body>
</html>
